module.exports = {
    presets: [
        [
            '@babel/preset-env',
            {
                modules: false,
                useBuiltIns: false,
                corejs: false,
                debug: false,
            },
        ],
        ['@babel/preset-typescript'],
        ['@babel/preset-react'],
    ],
    env: {
        test: {
            plugins: [],
        },
    },
    plugins: [
        ['@babel/plugin-transform-modules-commonjs'],
        ['@babel/plugin-proposal-optional-chaining'],
        ['@babel/plugin-transform-runtime'],
        ['@babel/plugin-syntax-dynamic-import'],
        ['@babel/plugin-transform-async-to-generator'],
        ['@babel/plugin-proposal-decorators', { legacy: true }],
        ['@babel/plugin-proposal-class-properties', { loose: true }],
        ['import', { libraryName: 'antd-mobile', libraryDirectory: 'lib', style: true }],
        'react-hot-loader/babel',
    ],
    ignore: [/node_modules/],
};
